package com.yzt.dynamicmodule.dialog;

import android.view.View;

import com.yzt.dynamicmodule.R;
import com.yzt.zhuju.dialog.BottomBaseDialog;

/**
 * 作者：bobwang
 * 创建时间：2023-12-15 00:30:32
 * 描述：
 */
public class GameMoreDialog extends BottomBaseDialog {
    @Override
    public int getLayoutRes() {
        return R.layout.dialog_game_in_more;
    }

    @Override
    public void bindView(View v) {

        boolean isHost = getArguments().getBoolean("isHost", false);

        if (!isHost) {
            findViewById(R.id.tv_1).setVisibility(View.GONE);
        }

        findViewById(R.id.img_close).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismissAllowingStateLoss();
            }
        });

        findViewById(R.id.tv_1).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                listener.onTranHost();
                dismissAllowingStateLoss();
            }
        });

        findViewById(R.id.tv_2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                listener.onReport();
                dismissAllowingStateLoss();
            }
        });
    }

    private OnSelectOnClickListener listener;

    public void setListener(OnSelectOnClickListener listener) {
        this.listener = listener;
    }

    public interface OnSelectOnClickListener {

        void onTranHost();

        void onReport();
    }
}
